package com.ruoyi.sales.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 售后服务对象 after_sale
 * 
 * @author ljy
 * @date 2025-08-17
 */
public class AfterSales extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 售后id */
    @Excel(name = "售后id")
    private Long id;

    /** 关联订单（和订单表id关联） */
    @Excel(name = "关联订单", readConverterExp = "和=订单表id关联")
    private Long orderId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private String userId;

    /** 售后类型(1仅退款2退货退款3换货) */
    @Excel(name = "售后类型(1仅退款2退货退款3换货)")
    private String serviceType;

    /** 退货原因（1商品损坏2不喜欢3七天无理由退货4拍错） */
    @Excel(name = "退货原因", readConverterExp = "1=商品损坏2不喜欢3七天无理由退货4拍错")
    private String serviceReason;

    /** 处理状态（0-待处理 （用户申请售后后默认状态）1-商家审核中 2-商家已同意 3-商家已拒绝 4-用户已发货 5-已完成） */
    @Excel(name = "处理状态", readConverterExp = "0=-待处理,（=用户申请售后后默认状态")
    private String serviceStatus;

    /** 平台实际退款金额 */
    @Excel(name = "平台实际退款金额")
    private BigDecimal refundAmount;

    /** 用户申请退款金额 */
    @Excel(name = "用户申请退款金额")
    private Long applyPrice;

    /** 拒绝原因 */
    @Excel(name = "拒绝原因")
    private String refundReason;

    // 临时字段，用于日期范围查询
    private String[] createTimeRange;
    private String[] updateTimeRange;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setServiceType(String serviceType) 
    {
        this.serviceType = serviceType;
    }

    public String getServiceType() 
    {
        return serviceType;
    }

    public void setServiceReason(String serviceReason) 
    {
        this.serviceReason = serviceReason;
    }

    public String getServiceReason() 
    {
        return serviceReason;
    }

    public void setServiceStatus(String serviceStatus) 
    {
        this.serviceStatus = serviceStatus;
    }

    public String getServiceStatus() 
    {
        return serviceStatus;
    }

    public void setRefundAmount(BigDecimal refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getRefundAmount() 
    {
        return refundAmount;
    }

    public void setApplyPrice(Long applyPrice) 
    {
        this.applyPrice = applyPrice;
    }

    public Long getApplyPrice() 
    {
        return applyPrice;
    }

    public void setRefundReason(String refundReason) 
    {
        this.refundReason = refundReason;
    }

    public String getRefundReason() 
    {
        return refundReason;
    }

    public String[] getCreateTimeRange() 
    {
        return createTimeRange;
    }

    public void setCreateTimeRange(String[] createTimeRange) 
    {
        this.createTimeRange = createTimeRange;
    }

    public String[] getUpdateTimeRange() 
    {
        return updateTimeRange;
    }

    public void setUpdateTimeRange(String[] updateTimeRange) 
    {
        this.updateTimeRange = updateTimeRange;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("serviceType", getServiceType())
            .append("serviceReason", getServiceReason())
            .append("serviceStatus", getServiceStatus())
            .append("refundAmount", getRefundAmount())
            .append("applyPrice", getApplyPrice())
            .append("refundReason", getRefundReason())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createTimeRange", getCreateTimeRange())
            .append("updateTimeRange", getUpdateTimeRange())
            .toString();
    }
}
